using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Syntax: BusinessObjectBase
	{

		#region InnerClass
		public enum SyntaxFields
		{
			SyntaxID,
			KeyWord,
			SyntaxContent
		}
		#endregion

		#region Data Members

			int _syntaxID;
			string _keyWord;
			string _syntaxContent;

		#endregion

		#region Properties

		public int  SyntaxID
		{
			 get { return _syntaxID; }
			 set
			 {
				 if (_syntaxID != value)
				 {
					_syntaxID = value;
					 PropertyHasChanged("SyntaxID");
				 }
			 }
		}

		public string  KeyWord
		{
			 get { return _keyWord; }
			 set
			 {
				 if (_keyWord != value)
				 {
					_keyWord = value;
					 PropertyHasChanged("KeyWord");
				 }
			 }
		}

		public string  SyntaxContent
		{
			 get { return _syntaxContent; }
			 set
			 {
				 if (_syntaxContent != value)
				 {
					_syntaxContent = value;
					 PropertyHasChanged("SyntaxContent");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("SyntaxID", "SyntaxID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("KeyWord", "KeyWord",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("SyntaxContent", "SyntaxContent",200));
		}

		#endregion

	}
}
